<!DOCTYPE html>
<html>
  <head>
    <script src="../dist/jspsych.js"></script>
    <script src="../dist/plugin-fullscreen.js"></script>
    <script src="../dist/plugin-image-keyboard-response.js"></script>
    <script src="../dist/plugin-preload.js"></script>
    <link rel="stylesheet" href="../dist/jspsych.css">
  </head>
  <body></body>
  <script>

    var jsPsych = initJsPsych({
      on_finish: function() {
        jsPsych.data.displayData();
      }
    });

    var fullscreen_trial = {
      type: jsPsychFullscreen,
      fullscreen_mode: true
    };

    var preload = {
      type: jsPsychPreload,
      auto_preload: true
    };

    var trial_1 = {
      type: jsPsychImageKeyboardResponse,
      stimulus: 'img/happy_face_1.jpg',
      choices: ['y','n'], 
      prompt: '<p>Have you seen this face before? Press "y" or "n".</p>'
    };

    var fullscreen_trial_exit = {
      type: jsPsychFullscreen,
      fullscreen_mode: false
    };

    jsPsych.run([fullscreen_trial, preload, trial_1, fullscreen_trial_exit]);

  </script>
</html>